package com.wp.美团;

import java.util.Scanner;

/**
 * @author 王萍
 * @date 2018/3/22 0022
 */
public class 字符串距离 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.next();
        String str2 = scanner.next();
        int sum = 0;
        int time = str1.length() - str2.length() + 1;
        char[] chars1 = str1.toCharArray();
        char[] chars2 = str2.toCharArray();
        int len = chars2.length;

        for (int i = 0; i < time; i++) {
            for (int j = 0; j < len; j++) {
                if (chars1[i + j] != chars2[j])
                    sum++;
            }
        }
        System.out.println(sum);
    }
}
